package com.wetao.lib_common.api;

import com.wetao.lib_common.base.Base2Response;
import com.wetao.lib_common.base.BaseListResponse;
import com.wetao.lib_common.base.BaseResponse;
import com.wetao.lib_common.bean.response.AppVersionInfo;
import com.wetao.lib_common.bean.response.AreaSchoolInfo;
import com.wetao.lib_common.bean.response.AssistantAnswerGridInfo;
import com.wetao.lib_common.bean.response.CheckCodeInfo;
import com.wetao.lib_common.bean.response.CheckStudentMacResp;
import com.wetao.lib_common.bean.response.CommitAssistantAnswerResp;
import com.wetao.lib_common.bean.response.ExamDetailInfo;
import com.wetao.lib_common.bean.response.ExamListInfo;
import com.wetao.lib_common.bean.response.ExaminationPointInfo;
import com.wetao.lib_common.bean.response.GetAssistantQuestionList;
import com.wetao.lib_common.bean.response.GetSubjectExamNumber;
import com.wetao.lib_common.bean.response.GetSubjectList;
import com.wetao.lib_common.bean.response.Loginbean;
import com.wetao.lib_common.bean.response.Loginbean_CoachClass;
import com.wetao.lib_common.bean.response.OssInfo;
import com.wetao.lib_common.bean.response.QueryExamQuestionsResponse;
import com.wetao.lib_common.bean.response.QuestionExplainListInfo;
import com.wetao.lib_common.bean.response.ReadPushFirstInfo;
import com.wetao.lib_common.bean.response.ReadPushListInfo;
import com.wetao.lib_common.bean.response.ReportStudyInfo;
import com.wetao.lib_common.bean.response.RevisionExamListInfo;
import com.wetao.lib_common.bean.response.RevisionExamQuestionInfo;
import com.wetao.lib_common.bean.response.SchoolClassInfo;
import com.wetao.lib_common.bean.response.SchoolGradeInfo;
import com.wetao.lib_common.bean.response.SingleStudyInfo;
import com.wetao.lib_common.bean.response.StudentExamGridInfoResp;
import com.wetao.lib_common.bean.response.StudentExamListInfo;
import com.wetao.lib_common.bean.response.StudentInfo;
import com.wetao.lib_common.bean.response.StudentLiveMessageInfo;
import com.wetao.lib_common.bean.response.StudyTaskCountInfo;
import com.wetao.lib_common.bean.response.SubjectInfo;
import com.wetao.lib_common.bean.response.WrongQuestionInfo;
import com.wetao.lib_common.bean.response.WrongQuestionListInfo;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * 网络请求接口
 */
public interface BaseApi {

    //获得阿里云 OSSconfig
    @POST("/api/studentScreen/alioss/ossConf")
    Observable<OssInfo> getOssConf();

    /**
     * 登录注册模块
     */
    //登录
    @POST("/api/studentScreen/info/login.json")
    Observable<BaseResponse<Loginbean>> login(@Body RequestBody requestBody);

    @POST("/api/teacher/info/regist.json")
    Observable<BaseResponse> register(@Body RequestBody requestBody);

    //获取短信验证码
    @POST("/api/studentScreen/info/forgetPasswordSendCode.json")
    Observable<BaseResponse> getVerifyCode(@Body RequestBody requestBody);

    //忘记密码 重置新密码
    @POST("/api/studentScreen/info/forgetPassword.json")
    Observable<Base2Response> resetNewPwd(@Body RequestBody requestBody);

    //已批改的列表
    @POST("api/teacher/marking/list.json")
    Observable<BaseResponse> getMarkingList(@Body RequestBody requestBody);

    //
//
    //修改密码
    @POST("api/epd/user/modifyPassword")
    Observable<Base2Response> modifyPwd(@Body RequestBody requestBody);

    //笔点击纸张，获取格子和试卷信息
    @POST("api/penBox/assistantAnswer/gridInfo.json")
    Observable<BaseListResponse<AssistantAnswerGridInfo>> getAssistantAnswerGridInfo(@Body RequestBody requestBody);

    //笔盒离线提交作答
    @POST("api/penBox/assistantAnswer/commitPenData.json")
    Observable<BaseResponse> postCommitPenData(@Body RequestBody requestBody);


    //笔盒获取课堂小测试题信息
//    @POST("api/box/studentExam/queryClassroomTestQuestionList.json")
//    Observable<BaseResponse<QueryClassroomTestQuestionListInfo>> queryClassroomTestQuestionList(@Body RequestBody requestBody);


    /***
     * homework, 科学训练，小测接口
     */
    //查询学生的学科信息列表,会根据学生的学段查询关联的学科。
    @POST("/api/studentScreen/info/getSubjectList.json")
    Observable<BaseListResponse<GetSubjectList>> getSubjectList(@Body RequestBody requestBody);

    //根据学生的学科查询学科下作业数。
    @POST("/api/studentScreen/studentExam/getSubjectExamNumber.json")
    Observable<BaseListResponse<GetSubjectExamNumber>> getSubjectExamNumber(@Body RequestBody requestBody);

    //科学训练-作业列表
    @POST("/api/studentScreen/studentExam/list.json")
    Observable<StudentExamListInfo> studentExamList(@Body RequestBody requestBody);

    //科学训练--点阵训练直连-获取试题
    @POST("/api/studentScreen/studentExam/getAssistantQuestionList.json")
    Observable<BaseListResponse<GetAssistantQuestionList>> getAssistantQuestionList(@Body RequestBody requestBody);

    //科学训练--图谱--点阵训练直连-获取试题
    @POST("/api/studentScreen/courseManager/getCourseQuestionList.json")
    Observable<BaseResponse<GetAssistantQuestionList>> getCourseQuestionList(@Body RequestBody requestBody);


    //科学训练--点阵训练直连-提交在线教辅作题答案
    @POST("/api/studentScreen/studentExam/commitAssistantAnswer.json")
    Observable<BaseResponse<CommitAssistantAnswerResp>> commitAssistantAnswer(@Body RequestBody requestBody);

    //随堂小测--查询作业试题
    @POST("/api/studentScreen/studentExam/queryClassroomTestQuestionList.json")
    Observable<BaseResponse<GetAssistantQuestionList>> queryClassroomTestQuestionList(@Body RequestBody requestBody);

    //随堂小测--查询作业试题
    @POST("/api/studentScreen/studentExam/queryClassroomTestQuestionList.json")
    Observable<BaseResponse<QueryExamQuestionsResponse>> queryClassroomTestQuestionOnlineList(@Body RequestBody requestBody);

    //科学训练-作业试题查询(包括未作答，已作答未批改的和已批改的)
    @POST("/api/studentScreen/studentExam/questionList.json")
    Observable<BaseResponse<QueryExamQuestionsResponse>> questionList(@Body RequestBody requestBody);

    //科学训练-作业试题查询--图谱
    @POST("/api/studentScreen/courseManager/courseExamQuestionList.json")
    Observable<BaseResponse<QueryExamQuestionsResponse>> courseExamQuestionList(@Body RequestBody requestBody);

    //待完成作业-提交作题答案
    @POST("/api/studentScreen/studentExam/commitAnswer.json")
    Observable<BaseResponse<CommitAssistantAnswerResp>> commitAnswer(@Body RequestBody requestBody);


    /**
     * 主页
     *
     * @return
     */
    //学习任务统计数量
    @POST("api/studentScreen/studentLive/homePageCount.json")
    Observable<StudyTaskCountInfo> getHomePageCount();

    //获取学生画屏最新版本
    @POST("api/studentScreen/studentLive/getStudentScreenClientVersion.json")
    Observable<BaseResponse<AppVersionInfo>> getStudentScreenClientVersion(@Body RequestBody requestBody);

    //学生课堂互动列表
    @POST("api/studentScreen/studentLive/getStudentLiveMessageList.json")
    Observable<StudentLiveMessageInfo> getHomeStudentLiveMessageList(@Body RequestBody requestBody);

    //查询任务
    @POST("api/studentScreen/studentExam/list.json")
    Observable<StudentExamListInfo> getHomeStudentExamList(@Body RequestBody requestBody);


    /**
     * 讲题微课模块接口
     *
     * @param requestBody
     * @return
     */
    @POST("api/studentScreen/questionExplain/questionExplainList.json")
    Observable<QuestionExplainListInfo> getQuestionExplainList(@Body RequestBody requestBody);

    @POST("api/studentScreen/questionExplain/updateUndrestand.json")
    Observable<BaseResponse> updateUnderstand(@Body RequestBody requestBody);


    /**
     * 错题斩模块接口
     */
    //查询学生错题列表
    @POST("api/studentScreen/studentWrongQuestion/selectWrongQuestion.json")
    Observable<WrongQuestionListInfo> selectWrongQuestionList(@Body RequestBody requestBody);

    //错题详情接口
    @POST("api/studentScreen/studentWrongQuestion/getWrongQuestionInfo.json")
    Observable<WrongQuestionInfo> getWrongQuestionInfo(@Body RequestBody requestBody);

    //说写订正接口
    @POST("api/studentScreen/studentWrongQuestion/revisionWrongQuestion.json")
    Observable<BaseResponse> revisionWrongQuestion(@Body RequestBody requestBody);

    //错题订正列表查询
    @POST("api/studentScreen/studentWrongQuestion/getStudentRevisionExamList.json")
    Observable<RevisionExamListInfo> getStudentRevisionExamList(@Body RequestBody requestBody);

    //错题订正详情
    @POST("api/studentScreen/studentWrongQuestion/revisionExamQuestionList.json")
    Observable<RevisionExamQuestionInfo> revisionExamQuestionList(@Body RequestBody requestBody);

    //获取学生学科
    @POST("api/studentScreen/common/querySubjectBySectionId.json")
    Observable<SubjectInfo> querySubjectBySectionId(@Body RequestBody requestBody);

    //查询知识考点
    @POST("api/studentScreen/common/queryExaminationPoint.json")
    Observable<ExaminationPointInfo> queryExaminationPoint(@Body RequestBody requestBody);

    //移除错题或更新掌握程度
    @POST("api/studentScreen/studentWrongQuestion/removeWrongQuestion.json")
    Observable<BaseResponse> removeWrongQuestion(@Body RequestBody requestBody);


    //获取学生笔盒信息
    @POST("/api/box/student/studentPenBoxInfo.json")
    Observable<StudentInfo> getStudentPenBoxInfo(@Body RequestBody requestBody);

    //修改学生批阅信息阅读状态
    @POST("/api/box/student/updateMessageReadState.json")
    Observable<BaseResponse<String>> updateMessageReadState(@Body RequestBody requestBody);

    //请求学生成绩列表
    @POST("/api/box/studentExam/list.json")
    Observable<ExamListInfo> getExamList(@Body RequestBody requestBody);

    //批阅详情
    @POST("/api/box/studentExam/questionList.json")
    Observable<ExamDetailInfo> queryMarkingDetail(@Body RequestBody requestBody);


    //智能笔
    //检查学生连接的mac 并返回上次连接地址
    @POST("/api/studentScreen/pen/checkStudnetMac.json")
    Observable<BaseResponse<CheckStudentMacResp>> checkStudentMac(@Body RequestBody requestBody);

    //确认连接- 更新学生笔连接记录
    @POST("/api/studentScreen/pen/studentConfirmConnect.json")
    Observable<BaseResponse<CheckStudentMacResp>> studentConfirmConnect(@Body RequestBody requestBody);

    //蓝牙笔-获取点阵试卷格子信息
    @POST("/api/studentScreen/studentExam/gridInfo.json")
    Observable<BaseListResponse<StudentExamGridInfoResp>> studentExamGridInfo(@Body RequestBody requestBody);

    @POST("/api/studentScreen/studentExam/pictrueGridInfo.json")
    Observable<BaseListResponse<StudentExamGridInfoResp>> pictrueGridInfo(@Body RequestBody requestBody);

    //蓝牙笔-离线数据提交
    @POST("/api/studentScreen/studentExam/commitPenData.json")
    Observable<BaseResponse> studentExamCommitPenData(@Body RequestBody requestBody);

    //蓝牙笔-离线提交教辅作答-适用于ocr和截图在本地
    @POST("/api/studentScreen/studentExam/clientCommitAnswer.json")
    Observable<BaseResponse> clientCommitAnswer(@Body RequestBody requestBody);


    //发送短信
    @POST("/api/studentScreen/common/sendMsg.json")
    Observable<BaseResponse> sendMsg(@Body RequestBody requestBody);

    //分级查询地区和学校
    @POST("/api/studentScreen/common/queryAreaOrSchool.json")
    Observable<BaseListResponse<AreaSchoolInfo>> queryAreaOrSchool(@Body RequestBody requestBody);

    //查询学校的年段和年级
    @POST("/api/studentScreen/common/querySchoolSectionGrade.json")
    Observable<BaseListResponse<SchoolGradeInfo>> querySchoolSectionGrade(@Body RequestBody requestBody);

    //学生修改手机号码
    @POST("/api/studentScreen/info/modifyMobile.json")
    Observable<BaseResponse<Loginbean>> modifyMobile(@Body RequestBody requestBody);

    //学生修改密码
    @POST("/api/studentScreen/info/modifyPassword.json")
    Observable<BaseResponse> modifyPassword(@Body RequestBody requestBody);

    //学生忘记密码发送验证码
    @POST("/api/studentScreen/info/forgetPasswordSendCode.json")
    Observable<BaseResponse<CheckCodeInfo>> forgetPasswordSendCode(@Body RequestBody requestBody);


    //学生退出选课班级
    @POST("/api/studentScreen/info/quitChoiceClass.json")
    Observable<BaseListResponse<Loginbean_CoachClass>> quitChoiceClass(@Body RequestBody requestBody);

    //学生添加选课班级
    @POST("/api/studentScreen/info/insertChoiceClass.json")
    Observable<BaseListResponse<Loginbean_CoachClass>> insertChoiceClass(@Body RequestBody requestBody);

    //学生修改选课班级
    @POST("/api/studentScreen/info/updateChoiceClass.json")
    Observable<BaseListResponse<Loginbean_CoachClass>> updateChoiceClass(@Body RequestBody requestBody);

    //学生加入行政班级/修改行政班级
    @POST("/api/studentScreen/info/joinClass.json")
    Observable<BaseResponse<Loginbean>> joinClass(@Body RequestBody requestBody);

    //学生手动选择行政班级列表
    @POST("/api/studentScreen/info/queryClassList.json")
    Observable<BaseListResponse<SchoolClassInfo>> queryClassList(@Body RequestBody requestBody);

    //学生选择选课班级列表
    @POST("/api/studentScreen/info/getChoiceClass.json")
    Observable<BaseListResponse<SchoolClassInfo>> getChoiceClass(@Body RequestBody requestBody);

    /**
     * 阅读推送
     */
    //分页查询阅读推送记录
    @POST("/api/studentScreen/studentLive/getStudentReadPushList.json")
    Observable<ReadPushListInfo> getStudentReadPushList(@Body RequestBody requestBody);

    @POST("/api/studentScreen/read/beginRead.json")
    Observable<BaseResponse> beginRead(@Body RequestBody requestBody);

    @POST("/api/studentScreen/read/endRead.json")
    Observable<BaseResponse> endRead(@Body RequestBody requestBody);

    @POST("/api/studentScreen/read/firstRead.json")
    Observable<ReadPushFirstInfo> getFirstRead();


    //学情报告
    @POST("/api/studentScreen/studentExam/queryDateStudyInfo.json")
    Observable<ReportStudyInfo> queryDateStudyInfo(@Body RequestBody requestBody);

    @POST("/api/studentScreen/studentExam/queryWeekStudyInfo.json")
    Observable<ReportStudyInfo> queryWeekStudyInfo(@Body RequestBody requestBody);

    @POST("/api/studentScreen/studentExam/queryMonthStudyInfo.json")
    Observable<ReportStudyInfo> queryMonthStudyInfo(@Body RequestBody requestBody);

    @POST("/api/studentScreen/studentExam/querySingleStudyInfo.json")
    Observable<BaseResponse<SingleStudyInfo>> querySingleStudyInfo(@Body RequestBody requestBody);

    //科学训练-作业列表
    @POST("/api/studentScreen/studentExam/studyInfoList.json")
    Observable<StudentExamListInfo> studyInfoList(@Body RequestBody requestBody);



}
